package com.hmall.vo;

import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Id;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @ClassName MallProductWithGradeVo
 * @Description
 * @Author zhoutao
 * @Date 2018/12/5 17:38
 * @Version 2.0
 **/
@Data
public class MallProductWithGradeVo {

    /**
     * 商品id
     */
    private Integer id;

    /**
     * 分类id,对应mall_category表的主键
     */
    private Integer categoryId;

    /**
     * 商品名称
     */
    private String name;

    /**
     * 商品副标题
     */
    private String subtitle;

    /**
     * 产品主图,url相对地址
     */
    private String mainImage;

    /**
     * 价格,单位-元保留两位小数
     */
    private BigDecimal price;

    /**
     * 库存重量 单位千克
     */
    private Integer stock;

    /**
     * 商品状态.1-在售 2-下架 3-删除
     */
    private Integer status;

    /**
     * 创建时间
     */
    @Column(name = "create_time")
    private Date createTime;

    /**
     * 更新时间
     */
    private Date updateTime;

    private String productno;

    private Integer shopid;

    private BigDecimal uprice;

    private Integer commentNum;

    private Integer special;

    private Integer searchHot;

    /**
     * 是否是新品，0：不是新品，1：是新品
     */
    private Integer isnew;



    private Integer shopId;

    /**
     * 图片地址,json格式,扩展用
     */
    private String subImages;

    /**
     * 商品详情
     */
    private String detail;

    private String content;

    private String title;

    String grade;

    public MallProductWithGradeVo(Integer id, Integer categoryId, String name, String subtitle, String mainImage, BigDecimal price, Integer stock, Integer status, Date createTime, Date updateTime, String productno, Integer shopid, BigDecimal uprice, Integer commentNum, Integer special, Integer searchHot, Integer isnew, Integer shopId, String subImages, String detail, String content, String title, String grade) {
        this.id = id;
        this.categoryId = categoryId;
        this.name = name;
        this.subtitle = subtitle;
        this.mainImage = mainImage;
        this.price = price;
        this.stock = stock;
        this.status = status;
        this.createTime = createTime;
        this.updateTime = updateTime;
        this.productno = productno;
        this.shopid = shopid;
        this.uprice = uprice;
        this.commentNum = commentNum;
        this.special = special;
        this.searchHot = searchHot;
        this.isnew = isnew;
        this.shopId = shopId;
        this.subImages = subImages;
        this.detail = detail;
        this.content = content;
        this.title = title;
        this.grade = grade;
    }
}
